<template>
  <div class="poster">
    <ContentBox title="邀请好友" @left="back" :fixed="true" :ostyle="style" titlecolor="block">
      <template slot="oleft"><van-icon color="#000" name="arrow-left"/></template>
    </ContentBox>
    <notice :top="$remToPx('0.88')" class="not"></notice>
    <div class="content">
      <div class="reoced">
       <h3 class="title">面对面扫码邀请</h3>
        <div class="recod" :style="{backgroundImage: `url(${img})`}">
        </div>
       <h3 class="title" style="color:#07634A">家 · 居 · 链 · 联 · 盟</h3>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data () {
    return {
      style: {
        backgroundColor: '#f6f6f6'
      },
      img: ''
    }
  },
  methods: {
    back () {
      if (this.$store.state.pl === 'H5') {
        this.$router.go(-1)
      } else if (this.$store.state.pl === 'IOS') {
        window.iosCallHandler('popVC')
      }
    },
    getImg () {
      this.$axios.get('/api/spread/banner').then(res => {
        if (res.status === 200) {
          this.img = res.data.img
        }
      })
    }
  },
  created () {
    this.getImg()
  }
}
</script>

<style lang="scss" scoped>
@import './index.scss';
.not{
  position: fixed;
  top: .88rem;
  width: 100%;
  left: 0;
}
</style>
